/* 
 * File:   Triangle.cpp
 * Author: Piotrek
 * 
 * Created on 24 kwiecień 2010, 19:21
 */
#include "stdafx.h"
#include "Triangle.h"


Triangle::Triangle(float n[], float v0[], float v1[], float v2[], int direction):
	normal(n[0]*direction,n[1]*direction,n[2]*direction), normal0(n[0]*direction,n[1]*direction,n[2]*direction)
{
	vertex[0]=Vertex(v0[0],v0[1],v0[2]);
	vertex[1]=Vertex(v1[0],v1[1],v1[2]);
	vertex[2]=Vertex(v2[0],v2[1],v2[2]);

	vertex0[0]=Vertex(v0[0],v0[1],v0[2]);
	vertex0[1]=Vertex(v1[0],v1[1],v1[2]);
	vertex0[2]=Vertex(v2[0],v2[1],v2[2]);
}


Triangle::Triangle(float n[], float x[], float y[], float z[]):
	normal(n[0],n[1],n[2]), normal0(n[0],n[1],n[2])
{
	vertex[0]=Vertex(x[0],y[0],z[0]);
	vertex[1]=Vertex(x[1],y[1],z[1]);
	vertex[2]=Vertex(x[2],y[2],z[2]);

	vertex0[0]=Vertex(x[0],y[0],z[0]);
	vertex0[1]=Vertex(x[1],y[1],z[1]);
	vertex0[2]=Vertex(x[2],y[2],z[2]);
}
